module.exports = {
    // 选项...
    devServer: {
        disableHostCheck: true,
        proxy: {

            "/app":{
                target: 'http://demo.99ios.com',
                secure: false,
                changeOrigin: true,
            },

            //tp
            '/general': {
                target: 'http://119.60.253.158:10000',
                secure: false,
                changeOrigin: true,
            },
            //微信后台
            '/app/wechat': {
                target: 'http://demo.99ios.com',
                secure: false,
                changeOrigin: true,
            },
            // //微信后台
            '/mp/': {
                target: 'http://demo.99ios.com',
                secure: false,
                changeOrigin: true,
            },
            '/oauth2/': {
                target: 'https://open.weixin.qq.com',
                secure: false,
                changeOrigin: true,
            },
            //go后台
            '/go/': {
                target: 'http://localhost:8085',
                secure: false,
                changeOrigin: true,
                pathRewrite: {
                    "^/go/": "/"
                }
            },
        
        }

    },
    //配置本地与现实build环境
    publicPath : process.env.NODE_ENV === 'production' ? './' : '/',
    outputDir: 'vuewechat',

    configureWebpack: config => {
        if (process.env.NODE_ENV === 'production') {
            // 为生产环境修改配置...
        } else {
            // 为开发环境修改配置...
        }
    },
};
